package com.appcheck.recording.action.impl;

import org.json.JSONException;
import org.json.JSONObject;

import com.appcheck.recording.action.AbstractAction;
import com.appcheck.recording.action.ActionConvert;
import com.appcheck.recording.handler.AbstractActionHandler;
import com.appcheck.recording.plugin.AbstractActionConverter;

public class TimeChangedAction implements AbstractAction, ActionConvert{

	private String resourceName;
	private int resourceId;
	private int index = -1;
	private int hourOfDay;
	private int minute;
	
	public final String toString(){
	    JSONObject localJSONObject = new JSONObject();
	    try
	    {
	      localJSONObject.put("class", "TimeChangedAction");
	      localJSONObject.put("resourceName", this.resourceName);
	      localJSONObject.put("resourceId", this.resourceId);
	      localJSONObject.put("index", this.index);
	      localJSONObject.put("hourOfDay", this.hourOfDay);
	      localJSONObject.put("minute", this.minute);
	    }
	    catch (JSONException localJSONException) {}
	    return localJSONObject.toString();
	}
	@Override
	public boolean handle(AbstractActionHandler param) {
		return param.visit(this);
	}
	public final int getResourceId() {
		return resourceId;
	}
	public final void setResourceId(int resourceId) {
		this.resourceId = resourceId;
	}
	public final int getIndex() {
		return index;
	}
	public final int getHourOfDay() {
		return hourOfDay;
	}
	public final int getMinute() {
		return minute;
	}
	public final void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}
	public final void setIndex(int index) {
		this.index = index;
	}
	public final void setHourOfDay(int hourOfDay) {
		this.hourOfDay = hourOfDay;
	}
	public final void setMinute(int minute) {
		this.minute = minute;
	}
	public final String getResourceName() {
		return resourceName;
	}
	@Override
	public void toTestCode(AbstractActionConverter actionConverter) {

	}
	

}
